#ifndef MOBILEFILESECONDWIDGET_H
#define MOBILEFILESECONDWIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QListWidget>
#include "mobilefilelistitem.h"

class MobileFileSecondWidget : public QWidget
{
    Q_OBJECT
public:
    MobileFileSecondWidget(int text, QWidget *parent = nullptr);
    ~MobileFileSecondWidget();

    enum SECOND_FILE_LIST_TYPE {QQPICTURE, QQVIDEO, QQMUSIC, QQDOCUMENT,
                                WECHATPICTURE, WECHATVIDEO, WECHATMUSIC, WECHATDOCUMENT};

    enum SECOND_FILE_LIST_WIN_TYPE {WECHAT = 12, QQ, HOMEPAGE};
    //设置项的个数
    void setItemCount(const QMap<QString, int> &map);
private Q_SLOTS:
    //模式切换
    void slotModeButtonClicked();
    //图片项
    void slotPictureButtonClicked();
    //视频项
    void slotVideoButtonClicked();
    //音乐项
    void slotMusicButtonClicked();
    //文档项
    void slotDocumentButtonClicked();
Q_SIGNALS:
    void sigShowMobileFileListWidget();
    void sigHideCopyToComputerWidget();
    void sigItemButtonClicked(int text);
    void sigUpdateClicked(int);

private:
    void initUI();
    void setItem();
    QPushButton *m_modeButton = nullptr;
    int m_mode = 0;
    int m_text;
    QListWidget *m_fileSecondListWidget = nullptr;
    QMap<QString, MobileFileListItem *> m_itemMap;
};

#endif // MOBILEFILESECONDWIDGET_H
